import datetime
sfz=str(input())
yearnow=datetime.datetime.now().year
yearsfz=int(sfz[6:10])
nowyear=yearnow-yearsfz
print('你出生于{}年{}月{}日\n你今年{}周岁'.format(yearsfz,sfz[10:12],sfz[12:14],nowyear))
if int(sfz[-2])%2!=0:
	print('你的性别为男')
else:
	print('你的性别为女')
